package com.controller;

import com.annotation.ContentType;
import com.entity.Message;
import com.service.TypeService;
import com.service.impl.TypeServiceImpl;

import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.sql.SQLException;

/**
 * @ProjectName: shop
 * @Author: Jsx
 * @Time: 2020/8/30 20:04
 * @Description:
 */
@WebServlet("/type")
public class TypeController extends BaseController{
    @ContentType("application/json;charset=utf-8")
    public Message getTypes(HttpServletRequest request , HttpServletResponse response) throws SQLException {
        //1.获取请求参数

        //2.调用业务逻辑
        TypeService typeService = new TypeServiceImpl();
        Message message = typeService.findTypes();

        return message;
    }
}
